cmf_get_image_url($file, $style = '')

功能

转化数据库保存图片的文件路径,为可以访问的url

参数

$file: string 文件路径,数据存储的文件相对路径 $style: string 图片样式,支持各大云存储

返回

string 图片链接

例子

<?php
// 数据存储的文件相对路径
$image_filepath='portal/12341234123412.jpg';

// 转化文件相对路径为可以访问的文件链接 
echo cmf_get_image_url($image_filepath);

results matching ""

    No results matching ""